package org.smr.ministore.dao;


import org.apache.ibatis.annotations.Param;
import org.blade.utils.Pager;
import org.smr.ministore.entities.GoodsPrice;
import org.apache.ibatis.annotations.Mapper;
import org.blade.dao.base.BaseMapper;
import org.blade.dao.base.PageQueryMapper;

import java.util.List;
import java.util.Map;


/**
*
**/
@Mapper
public interface GoodsPriceMapper extends BaseMapper<Long, GoodsPrice>,PageQueryMapper<Long,GoodsPrice> {

    /**
    * 逻辑删除
    * @param id
    *
    */
    int deleteByIdLogical(@Param("id")Long id);

    /**
     * 获取商口列表
     * @param organId
     * @param typeId
     * @param brandId
     * @param goodsName
     * @param quote
     * @return
     */
    List<Map<String, Object>> getGoodsPricePagination(@Param("organId")Long organId,
                                                @Param("typeId")Long typeId,
                                                @Param("brandId")Long brandId,
                                                @Param("goodsName")String goodsName,
                                                @Param("quote")Integer quote,
                                                @Param("page") Pager<Map<String, Object>> pager );


    /**
     * 获取商品价格
     * @param organId
     * @param goodsId
     * @return
     */
    GoodsPrice getGoodsPriceBy(@Param("organId")Long organId,
                               @Param("goodsId")Long goodsId );

}